<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="js/layui-v2.6.4/layui/css/modules/layer/default/layer.css"/>
    <link rel="stylesheet" type="text/css" href="css/home.css"/>
    <link rel="stylesheet" type="text/css" href="css/all.css"/>
</head>
<style>
    input {
        width: 300px;
        border: 1px solid #DEDEDE;
        height: 50px;
        /*border-radius: 5px;*/
        color: #A9A9A9;
        padding: 10px;
        margin-top: 5%;
    }
</style>
<body style="text-align: center;background-image: url(img/login_bgc.png);background-size: 100%;">
<div class="login2">
    <h1 style="color: white;margin-top: 13%;font-weight:700;color: #104838;">欢迎登录系统管理平台</h1>
</div>
<div class="dl" style="height: 350px;width: 450px;border-radius: 10px;margin-left: 38%;margin-top: 5%;">
    <div class="name">
        <input type="text" name="" id="account" placeholder="请输入账号" style="margin-top: 15%;width: 400px">
    </div>
    <div class="password">
        <input type="password" name="" id="password" placeholder="请输入密码" style="width: 400px">
    </div>
    <!--<div class="layui-form-item">
 <div class="layui-input-block" style="background-color: transparent;">
   <select onchange="window.location=this.value;" lay-verify="required" id="xuanxiang" style="margin-left:-110px;margin-top: 20px;height:50px;padding: 5px;width: 400px ;border: 1px solid #DEDEDE;color: #A9A9A9;">
    <option value="1">请选择</option>
    <option value="./guanli/jiaoseguanli.html" style="background-color: transparent;">管理员</option>
     <option value="./kaosheng/baomingshenqing.html">考生</option>
   <option value="./peixunxueyuan/kaoqingmingxi.html">培训学员</option>
       <option value="./jiandingzhan/jiandingzhan.html">鉴定站</option>
       <option value="./jiandingzhongxin/tongjifenxihuizong.html">鉴定中心</option>
   </select>
 </div>
</div>-->
    <!--<button type="button" class="layui-btn layui-btn-normal" style="width: 400px;height: 50px;margin-top: 5%;">登陆</button>-->
    <!--<a href="JavaScript:;" style="float: right;text-decoration: none;color: #43A6d9;margin-right:5%;">注册</a>
     </div>-->
    <button type="button" id="login" class="layui-btn " onclick="login()"
            style="width: 400px;height: 50px;margin-top: 30px;background-color: #104838;font-size: 20px;">登录
    </button>
    <div class="saoma" style="margin-top: 20px">
        <img src="img/qrcode.png" style="width: 120px;">
        <p style="margin-top: 10px;color: #666">请用浏览器扫描二维码下载安卓APK</p>
    </div>

</div>
</body>
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.cookie.js"></script>
<script src="bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
<script src="bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript"
        charset="utf-8"></script>
<script src="js/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="js/config/url.js" type="text/javascript" charset="utf-8"></script>
<script src="js/util.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function () {
        utils.keyDwonEvent(login);
    })


    function login() {
        $.ajax({
            url: loginUrl,
            type: 'POST',
            contentType: "application/x-www-form-urlencoded",
            withCredentials: true,

            data:
                {
                    account: $("#account").val(),
                    password: $("#password").val()
                },
            success: function (data) {
                if (data.code == 0) {
                    $.cookie("token", data.token);
                    $.cookie("userName", data.userName);
                    $.cookie("drillUuid", data.drillUuid);
                    $.cookie("drillName", data.drillName);
                    location.href = "kh/xinjianyanlian.html";
                } else {

                    msgUtil.error(data.msg);
                }
            },
            error: function (data) {
                msgUtil.error(data.msg);
            }
        });
    }
</script>
</html>
